<style>
#owner-edit th {
	width: 100px;
}
#owner-edit label {
	display: inline;
}
#owner-edit input {
	width: 200px;
}
#submit-btn {
	padding-left: 120px;
}
#submit-btn input {
	width: 60px;
}
th, td, caption {
	padding: 0px 5px;		
}
</style>
<script>
$(function(){
	$(":input").attr('disabled', 'disable');

	$("#edit-btn").click(function(){
		$(":input").removeAttr('disabled');
	})
})
</script>

<div id="owner-edit" class="form block">
	<div class="block-title">
		<?php echo $block_title?>
		<a href="#" style="font-size: 12px; margin-left: 5px;" id="edit-btn">[编辑]</a>
	</div>

	<table>
	<?php $form=$this->beginWidget('CActiveForm', array(
	    'id'=>'owner-form',
	    'enableAjaxValidation'=>true,
	)); ?>
	    <?php echo $form->errorSummary($model); ?>
	
	    <tr>
	    	<th>
	        	<?php echo $form->labelEx($model,'loginid'); ?>
	        </th>
	        <td><?php echo $form->textField($model,'loginid',array('size'=>35,'maxlength'=>35)); ?>
	        	<?php echo $form->error($model,'loginid'); ?>
	    	</td>

	    	<th>
	        	<?php echo $form->labelEx($model,'passwd'); ?>
	        </th>
	        <td>
	        	<?php echo $form->textField($model,'passwd',array('size'=>50,'maxlength'=>50)); ?>
	        	<?php echo $form->error($model,'passwd'); ?>
	    	</td>
	    </tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'inuse'); ?>
	        </th><td><?php echo $form->textField($model,'inuse'); ?>
	        <?php echo $form->error($model,'inuse'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'firstname'); ?>
	        </th><td><?php echo $form->textField($model,'firstname',array('size'=>50,'maxlength'=>50)); ?>
	        <?php echo $form->error($model,'firstname'); ?>
	    </td></tr>
	
	    <tr>
	    	<th>
		        <?php echo $form->labelEx($model,'lastname'); ?>
		        </th><td><?php echo $form->textField($model,'lastname',array('size'=>50,'maxlength'=>50)); ?>
		        <?php echo $form->error($model,'lastname'); ?>
		    </td>
	    	<th>
	        	<?php echo $form->labelEx($model,'username'); ?>
	        </th>
	        <td>
	        	<?php echo $form->textField($model,'username',array('size'=>50,'maxlength'=>50)); ?>
	        	<?php echo $form->error($model,'username'); ?>
	    		</td>
	    	</tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'company'); ?>
	        </th><td><?php echo $form->textField($model,'company',array('size'=>60,'maxlength'=>100)); ?>
	        <?php echo $form->error($model,'company'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'email'); ?>
	        </th><td><?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>60)); ?>
	        <?php echo $form->error($model,'email'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'paypal_email'); ?>
	        </th><td><?php echo $form->textField($model,'paypal_email',array('size'=>60,'maxlength'=>60)); ?>
	        <?php echo $form->error($model,'paypal_email'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'telephone'); ?>
	        </th><td><?php echo $form->textField($model,'telephone',array('size'=>60,'maxlength'=>60)); ?>
	        <?php echo $form->error($model,'telephone'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'fax'); ?>
	        </th><td><?php echo $form->textField($model,'fax',array('size'=>60,'maxlength'=>60)); ?>
	        <?php echo $form->error($model,'fax'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'payableto'); ?>
	        </th><td><?php echo $form->textField($model,'payableto',array('size'=>60,'maxlength'=>200)); ?>
	        <?php echo $form->error($model,'payableto'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'country'); ?>
	        </th><td><?php echo $form->textField($model,'country',array('size'=>50,'maxlength'=>50)); ?>
	        <?php echo $form->error($model,'country'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'street'); ?>
	        </th><td><?php echo $form->textField($model,'street',array('size'=>60,'maxlength'=>250)); ?>
	        <?php echo $form->error($model,'street'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'city'); ?>
	        </th><td><?php echo $form->textField($model,'city',array('size'=>60,'maxlength'=>250)); ?>
	        <?php echo $form->error($model,'city'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'state'); ?>
	        </th><td><?php echo $form->textField($model,'state',array('size'=>60,'maxlength'=>200)); ?>
	        <?php echo $form->error($model,'state'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'address'); ?>
	        </th><td><?php echo $form->textField($model,'address',array('size'=>60,'maxlength'=>250)); ?>
	        <?php echo $form->error($model,'address'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'postcode'); ?>
	        </th><td><?php echo $form->textField($model,'postcode',array('size'=>20,'maxlength'=>20)); ?>
	        <?php echo $form->error($model,'postcode'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'url'); ?>
	        </th><td><?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>200)); ?>
	        <?php echo $form->error($model,'url'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'site'); ?>
	        </th><td><?php echo $form->textField($model,'site',array('size'=>60,'maxlength'=>150)); ?>
	        <?php echo $form->error($model,'site'); ?>
	    </td></tr>
	
	    <tr>
	    	<th>
	        	<?php echo $form->labelEx($model,'remark'); ?>
	        </th>
	        <td>
	       		<?php echo $form->textField($model,'remark',array('rows'=>6, 'cols'=>50)); ?>
	        	<?php echo $form->error($model,'remark'); ?>
	        </td>
	    <th>
	        <?php echo $form->labelEx($model,'clicknum'); ?>
	        </th><td><?php echo $form->textField($model,'clicknum'); ?>
	        <?php echo $form->error($model,'clicknum'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'validclick'); ?>
	        </th><td><?php echo $form->textField($model,'validclick'); ?>
	        <?php echo $form->error($model,'validclick'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'adddate'); ?>
	        </th><td><?php echo $form->textField($model,'adddate'); ?>
	        <?php echo $form->error($model,'adddate'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'usertype'); ?>
	        </th><td><?php echo $form->textField($model,'usertype'); ?>
	        <?php echo $form->error($model,'usertype'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'startdate'); ?>
	        </th><td><?php echo $form->textField($model,'startdate'); ?>
	        <?php echo $form->error($model,'startdate'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'vaildclick'); ?>
	        </th><td><?php echo $form->textField($model,'vaildclick'); ?>
	        <?php echo $form->error($model,'vaildclick'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'totalclick'); ?>
	        </th><td><?php echo $form->textField($model,'totalclick'); ?>
	        <?php echo $form->error($model,'totalclick'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'loginnum'); ?>
	        </th><td><?php echo $form->textField($model,'loginnum'); ?>
	        <?php echo $form->error($model,'loginnum'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'ip'); ?>
	        </th><td><?php echo $form->textField($model,'ip',array('size'=>20,'maxlength'=>20)); ?>
	        <?php echo $form->error($model,'ip'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'paid_amount'); ?>
	        </th><td><?php echo $form->textField($model,'paid_amount',array('size'=>12,'maxlength'=>12)); ?>
	        <?php echo $form->error($model,'paid_amount'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'balance'); ?>
	        </th><td><?php echo $form->textField($model,'balance',array('size'=>8,'maxlength'=>8)); ?>
	        <?php echo $form->error($model,'balance'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'lastlogin'); ?>
	        </th><td><?php echo $form->textField($model,'lastlogin'); ?>
	        <?php echo $form->error($model,'lastlogin'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'joinmb'); ?>
	        </th><td><?php echo $form->textField($model,'joinmb'); ?>
	        <?php echo $form->error($model,'joinmb'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'order_amount'); ?>
	        </th><td><?php echo $form->textField($model,'order_amount',array('size'=>12,'maxlength'=>12)); ?>
	        <?php echo $form->error($model,'order_amount'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'ordernum'); ?>
	        </th><td><?php echo $form->textField($model,'ordernum',array('size'=>10,'maxlength'=>10)); ?>
	        <?php echo $form->error($model,'ordernum'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'payplan1'); ?>
	        </th><td><?php echo $form->textField($model,'payplan1'); ?>
	        <?php echo $form->error($model,'payplan1'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'payplan2'); ?>
	        </th><td><?php echo $form->textField($model,'payplan2'); ?>
	        <?php echo $form->error($model,'payplan2'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'payplan3'); ?>
	        </th><td><?php echo $form->textField($model,'payplan3'); ?>
	        <?php echo $form->error($model,'payplan3'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'request_pay'); ?>
	        </th><td><?php echo $form->textField($model,'request_pay',array('size'=>1,'maxlength'=>1)); ?>
	        <?php echo $form->error($model,'request_pay'); ?>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'request_pay_date'); ?>
	        </th><td><?php echo $form->textField($model,'request_pay_date'); ?>
	        <?php echo $form->error($model,'request_pay_date'); ?>
	    </td>
	    	<th>
	        	<?php echo $form->labelEx($model,'request_pay_detail'); ?>
	        </th>
	        <td>
	        	<?php echo $form->textField($model,'request_pay_detail',array('rows'=>6, 'cols'=>50)); ?>
	        	<?php echo $form->error($model,'request_pay_detail'); ?>
	        </td>
	    </td></tr>
	
	    <tr><th>
	        <?php echo $form->labelEx($model,'display'); ?>
	        </th><td><?php echo $form->textField($model,'display',array('size'=>1,'maxlength'=>1)); ?>
	        <?php echo $form->error($model,'display'); ?>
	    </td><th>
	        <?php echo $form->labelEx($model,'email_enabled'); ?>
	        </th><td><?php echo $form->textField($model,'email_enabled',array('size'=>1,'maxlength'=>1)); ?>
	        <?php echo $form->error($model,'email_enabled'); ?>
	    </td></tr>
	
	<?php $this->endWidget(); ?>
	</table>
	<div id="submit-btn"><?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?></div>
</div><!-- form -->